{extend name="default/template/base_index" /}

{block name="area_header"}

{/block}

{block name="area_body"}
	{include file="default/Widget/topbar" /}
	<div class="admin-main container-fluid">
		{include file="default/Widget/left" /}
		<div class="admin-main-content">
			{include file="default/Widget/breadcrumb" /}

			<!-- 标题栏 -->
			<div class="main-title">
				<h2>行为列表</h2>
			</div>

			<div>
				<a class="btn  btn-primary btn-sm" id="action_add" href="{:url('Action/add')}"><i class="fa fa-plus"></i> 新 增</a>
				<a class="btn btn-primary ajax-post btn-sm" target-form="ids" href="{:url('Action/enable')}"><i class="fa fa-check-circle-o"></i> 启 用</a>
				<a class="btn btn-primary ajax-post btn-sm" target-form="ids" href="{:url('Action/disable')}"><i class="fa fa-times-circle-o"></i> 禁 用</a>
				<a class="btn btn-danger  ajax-post confirm  btn-sm" target-form="ids" href="{:url('Action/delete')}"><i class="fa fa-trash"></i> 删 除</a>
			</div>
			<!-- 数据列表 -->
			<div class="table-responsive">
				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th class="row-selected row-selected">
								<input class="select-all" onclick="window.myUtils.selectall('.select-all','.ids')" type="checkbox" />
							</th>
							<th class="">编号</th>
							<th class="">标识</th>
							<th class="">名称</th>
							<th class="">类型</th>
							<th class="">规则</th>
							<th class="">状态</th>
							<th class="">操作</th>
						</tr>
					</thead>
					<tbody>
						{volist name="list" id="vo"}
							<tr>
								<td>
									<input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" />
								</td>
								<td>{$vo.id} </td>
								<td>{$vo.name}</td>
								<td><a href="{:url('Action/edit?id='.$vo['id'])}">{$vo.title}</a>
								</td>
								<td><span>{:get_action_type($vo['type'])}</span>
								</td>
								<td>{$vo.remark}</td>
								<td>{$vo.status_text}</td>
								<td>
									<a class="btn btn-sm btn-default " href="{:url('Action/edit?id='.$vo['id'])}"><i class="fa fa-edit"></i>编辑</a>
									{eq name="vo['status']" value="1"}
										<a class="btn btn-sm btn-danger ajax-get confirm" href="{:url('Action/disable?ids='.$vo['id'])}">
											<i class="fa fa-times-circle-o"></i>禁用</a>
										{else/}
										<a class="btn btn-sm btn-default ajax-get confirm" href="{:url('Action/enable?ids='.$vo['id'])}">
											<i class="fa fa-times-circle-o"></i>启用</a>
									{/eq}
									<a href="{:url('Action/delete?ids='.$vo['id'].',')}" class="confirm ajax-get btn btn-sm btn-danger "><i class="fa fa-trash"></i>删除</a>
								</td>
							</tr>
						{/volist}
					</tbody>
				</table>

			</div>
			<!-- 分页 -->
			<div class="page">{$show}</div>
			<!-- /分页 -->
		</div>

{/block}
{block name="area_footer"}

{/block}